
<%@page import="qldc.pm.qtht.dmdc.utils.DiaChiUtils"%>
<%@page import="qldc.pm.qtht.dmdc.service.QuanHeGiaDinhLocalServiceUtil"%>
<%@page import="qldc.pm.qtht.dmdc.model.QuanHeGiaDinh"%>
<%@page import="qldc.pm.csdl.cd90.service.QuanHeVoiChuHoLocalServiceUtil"%>
<%@page import="qldc.pm.csdl.cd90.model.QuanHeVoiChuHo"%>
<%@page import="qldc.pm.csdl.cd90.service.CongDanDTOLocalServiceUtil"%>
<%@page import="qldc.pm.csdl.cd90.model.dto.CongDanDTO"%>
<%@ include file="../../init.jsp"%>

<%
	String soDinhDanhCaNhan = ParamUtil.getString(request, "soDinhDanhCaNhan");
	System.out.println("thong tin ho khau: soDinhDanhCaNhan: >>>"+soDinhDanhCaNhan);
	CongDanDTO congDanDTO = null;
	String _hoTenChuHo  = "";
	String _quanHeVoiChuHo = "";
	String _noiThuongTru ="";
	String _noiOHienTai = "";
	String _soSoHoKhau = "";
	if(Validator.isNotNull(soDinhDanhCaNhan)){
		congDanDTO = CongDanDTOLocalServiceUtil.findBySoDinhDanhCaNhan(soDinhDanhCaNhan);
		_hoTenChuHo = congDanDTO.getHoVaTenChuHo();
		QuanHeVoiChuHo quanHeVoiChuHo = QuanHeVoiChuHoLocalServiceUtil.findBySoDinhDanhCaNhan(soDinhDanhCaNhan);
		if(Validator.isNotNull(quanHeVoiChuHo)){
			_soSoHoKhau = quanHeVoiChuHo.getSoSoHoKhau();
			QuanHeGiaDinh quanHeGiaDinh = QuanHeGiaDinhLocalServiceUtil.findById(quanHeVoiChuHo.getDmdcQuanHeGiaDinhId());
			if(Validator.isNotNull(quanHeGiaDinh)){
				_quanHeVoiChuHo = quanHeGiaDinh.getTenQuanHeGiaDinh();
			}
		}
		_noiThuongTru = DiaChiUtils.createBlockDiaChi(congDanDTO.getNoiThuongTruTinhId(), congDanDTO.getNoiThuongTruQuanHuyenId(), congDanDTO.getNoiThuongTruPhuongXaId(), congDanDTO.getNoiThuongTruDiaChi());
		_noiOHienTai = DiaChiUtils.createBlockDiaChi(congDanDTO.getNoiOHienTaiTinhId(), congDanDTO.getNoiOHienTaiQuanHuyenId(), congDanDTO.getNoiOHienTaiPhuongXaId(), congDanDTO.getNoiOHienTaiDiaChi());
	}
%>

<div id="<portlet:namespace/>thong-tin-ho-khau-content">
	<table class="gridnormal">
		<tr>
			<td>
				<liferay-ui:message key="so-so-ho-khau" />
			</td>
			<td>
				<%=_soSoHoKhau %>
			</td>
		</tr>

		<tr>
			<td>
				<liferay-ui:message key="ho-ten-chu-ho" />
			</td>
			<td>
				<%= _hoTenChuHo %>
			</td>
		</tr>
		
		<tr>
			<td>
				<liferay-ui:message key="quan-he-voi-chu-ho" />
			</td>
			<td>
				<%= _quanHeVoiChuHo %>
			</td>
		</tr>

		<tr>
			<td>
				<liferay-ui:message key="dc-thuong-tru" />
			</td>
			<td>
				<%= _noiThuongTru %>
			</td>
		</tr>

		<tr>
			<td>
				<liferay-ui:message key="noi-o-hien-tai" />
			</td>
			<td>
				<%= _noiOHienTai %>
			</td>

		</tr>
	</table>
</div>

<script type="text/javascript">
</script>